/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.srcptit.trainning.thompv.BaitapMuc1_2;
import java.util.Scanner;
/**
 *
 * @author SONY
 */
public class Bai6Muc1 {
    static boolean thuannghich(int n)
    {
        int goc=n, dao=0;
        while(n>0)
        {
            dao=dao*10+n%10;
            n/=10;
        }
        if(goc==dao) return true;
        return false;
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("Ket qua:");
        for(int i=100001;i<=999999;i++)
            if(thuannghich(i)) System.out.println(i);
    }
}
